<?php
/***************************************************************
*  Copyright notice
*  (c) 2009, jianyuzhu@gmail.com
*  All rights reserved
*  This script is part of the PPEMI project.
***************************************************************/

//
include_once(CONFIG_PATH . CONFIG_DIR_CLASSES . 'base.item.class.php');

class CustomerBase extends BaseItemBase {
	
	//constructor
	function CustomerBase() {
		parent::BaseItemBase();
		
		$this->table = 'pp_users';
		$this->prefix = 'users_';
		
		$this->search_fields = array('name');
		$this->sort_fields = array('id-', 'name+');
	}
	
	//methods
	function onAddItemFilterBind($data_array) {
		$fb = array();
		$fb['users_type'] = 'customer';
		
		return $fb;
	}
	
	function _get_query_str_custom($filter = '', $check = 0) {
		return " and users_type = 'customer'";
	}
}
//
?>